import { ref } from "vue";
//  全局共用
const dialogLevel = ref(0);

/**
 * 
 * @returns {
 *  [ '层级', '增加层级', '减少层级' ]
 * }
 * 
 */
export function useDialogLevel(): any[] {
    function addDialogLevel() {
        dialogLevel.value += 10;
    }

    function subDialogLevel() {
        if (dialogLevel.value === 0) return;

        dialogLevel.value -= 10;
    }

    return [dialogLevel, addDialogLevel, subDialogLevel];
}